<h1>SPPB Document</h1>
<?php 
    if($sppb){$data = $sppb['data'];$lineitems = $sppb['lineitem'];?>
<fieldset>
<legend>Data</legend>
<table>
    <tr>
        <td><label>Creation Date</label></td>
        <td><label><?php echo $data->CreationDate;?></label></td>
        <td>SPPB Number</td>
        <td><label><?php echo $data->SPPBNumber;?></label></td>
    </tr>
    <tr>
        <td><label>PIB Number</label></td>
        <td><label><?php echo $data->PIBNumber;?></label></td>
        <td></td>
        <td><label></label></td>
    </tr>
    <tr>
        <td>Consignee</td>
        <td><label><?php echo $data->CName;?></label></td>
        <td>PPJK</td>
        <td><label><?php echo $data->PPJKName;?></label></td>
    </tr>
    <tr>
        <td></td>
        <td><label><?php echo $data->CAddress;?></label></td>
        <td></td>
        <td><label><?php echo $data->PPJKAddress;?></label></td>
    </tr>
    <tr>
        <td></td>
        <td><label><?php echo $data->CNPWP;?></label></td>
        <td></td>
        <td><label><?php echo $data->PPJKNPWP;?></label></td>
    </tr>
    <tr>
        <td>Location of Goods</td>
        <td><label><?php echo $data->GoodsLocation;?></label></td>
        <td>BL Number</td>
        <td><label><?php echo $data->BLNumber;?></label></td>
    </tr>
    <tr>
        <td>BL Date</td>
        <td><label><?php echo $data->BLDate;?></label></td>
        <td>Vessel</td>
        <td><label><?php echo $data->Vessel;?></label></td>
    </tr>
        <td>Voyage</td>
        <td><label><?php echo $data->Voyage;?></label></td>
        <td>BC 11 Number</td>
        <td><label><?php echo $data->BC11Number;?></label></td>
    </tr>
    <tr>
        <td>BC 11 Date</td>
        <td><label><?php echo $data->BC11Date;?></label></td>
        <td>BC 11 Post</td>
        <td><label><?php echo $data->BC11Post;?></label></td>
    </tr>
    <tr>
        <td>Total Package</td>
        <td><label><?php echo $data->TotalPackage;?></label></td>
        <td>Weigth Package</td>
        <td><label><?php echo $data->WeightPackage;?></label></td>
    </tr>
    <tr>
        <td>Brand Package</td>
        <td><label><?php echo $data->BrandPackage;?></label></td>
        <td>Total Container</td>
        <td><label><?php echo $data->TotalContainer;?></label></td>
    </tr>
</table>
</fieldset>
<fieldset>
<legend>Container</legend>
    <table>
        <tr>
            <td>| Container No</td>
            <td>| Size</td>
            <td>| Penegahan</td>
            <td>| Explanation |</td>
        </tr>
        <?php foreach($lineitems as $lineitem) { ?>
        <tr>
            <td><?php echo $lineitem->ContainerNo;?></td>
            <td><?php echo $lineitem->Size;?></td>
            <td><?php echo $lineitem->Penegahan;?></td>
            <td><?php echo $lineitem->Explanation;?></td>
        </tr>
        <?php } ?>
    </table>
</fieldset>
<br/>
<?php } ?>